<%@ page contentType="text/html; charset=UTF-8"%>
<%@ taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@ taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<html>
<head>
<title>Device Management</title>
</head>
<link rel="stylesheet" href="../../../resources/css/fw-edit.css"
	type="text/css">
<script src="../../../script/base.js"></script>
<body>
	<f:view>
		<f:loadBundle basename="net.orange.conf.lang.fw" var="msg" />
		<h:form id="myForm">
			<h:inputHidden value="#{device.content.pk}" id="pk" />
			<h:inputHidden value="#{device.editMode}" id="editMode" />

			<h:panelGrid columns="2" rowClasses="content-title"
				style="width:100%;">
				<h:outputText value="Device Management." />

				<h:panelGroup style="text-align:right">
					<h:commandButton value="Copy" type="submit" id="cmdCopyLite"
						action="#{device.copyLiteUser}" styleClass="button-normal"
						rendered="#{not device.editMode}" />

					<h:outputText value="    " />

					<h:commandButton value="#{msg.common_edit}" type="submit"
						id="cmdEdit" action="#{device.edit}" styleClass="button-normal"
						rendered="#{not device.editMode}" />

					<h:commandButton value="#{msg.common_save}" type="submit"
						id="cmdSave" action="#{device.save}" styleClass="button-normal"
						rendered="#{device.editMode}" />

					<h:outputText value="    " />
					<h:commandButton value="#{msg.common_cancel}" type="submit"
						id="cmdCancel" action="#{device.back}" styleClass="button-normal" />
				</h:panelGroup>
			</h:panelGrid>

			<hr>

			<h:messages styleClass="content-message" />

			<h:panelGrid columns="2" styleClass="content-table"
				columnClasses="content-detail-title,content-detail">
				<!-- 
				<h:outputLabel value="#{msg.common_pk}:" />
				<h:outputText value="#{device.content.pk}" />
 
				<h:outputLabel value="&nbsp;" escape="false" />
				<h:outputLabel value="&nbsp;" escape="false" />
-->
				<h:outputLabel value="User Code:" />
				<h:inputText value="#{device.content.user_id}" id="user_id"
					disabled="true" />

				<h:outputLabel value="User Name:" />
				<h:inputText value="#{device.content.user_name}" id="user_name"
					disabled="#{not device.editMode}" />

				<h:outputLabel value="Mobile Phone:" />
				<h:inputText value="#{device.content.mobile_phone}"
					id="mobile_phone" disabled="#{not device.editMode}" />

				<h:outputLabel value="Nick Name:" />
				<h:inputText value="#{device.content.nickname}" id="nickname"
					disabled="#{not device.editMode}" />

				<h:outputLabel value="Purchase Date:" />
				<h:inputText value="#{device.content.purchase_date}"
					id="purchase_date" disabled="#{not device.editMode}">
					<f:convertDateTime pattern="yyyy-MM-dd" />
				</h:inputText>

				<h:outputLabel value="Gender:" />
				<h:selectOneMenu value="#{device.content.gender}" id="gender"
					disabled="#{not device.editMode}" style="width:240px">
					<f:selectItems value="#{device.genders}" />
				</h:selectOneMenu>

				<h:outputLabel value="Password:" />
				<h:inputText value="#{device.content.user_password}"
					id="user_password" disabled="#{not device.editMode}" />

				<h:outputLabel value="&nbsp;" escape="false" />
				<h:outputLabel value="&nbsp;" escape="false" />


				<h:outputLabel value="Device IMEI#:" />
				<h:inputText value="#{device.content.imei_number}" id="imei_number"
					disabled="#{not device.editMode}" />

				<h:outputLabel value="Device SIM#:" />
				<h:inputText value="#{device.content.sim_number}" id="sim_number"
					disabled="#{not device.editMode}" />


				<h:outputLabel value="Vechile Modal:" />
				<h:inputText value="#{device.content.vechile_model}"
					id="vechile_model" disabled="#{not device.editMode}" />

				<h:outputLabel value="Board Plate:" />
				<h:inputText value="#{device.content.board_plate}" id="board_plate"
					disabled="#{not device.editMode}" />

				<h:outputLabel value="Frame Number:" />
				<h:inputText value="#{device.content.frame_number}"
					id="frame_number" disabled="#{not device.editMode}" />


				<h:outputLabel value="&nbsp;" escape="false" />
				<h:outputLabel value="&nbsp;" escape="false" />

				<h:outputLabel value="Engine Number:" />
				<h:inputText value="#{device.content.engine_number}"
					id="engine_number" disabled="#{not device.editMode}" />


				<h:outputLabel value="WeiBox Account:" />
				<h:inputText value="#{device.content.weibo_account}"
					id="weibo_account" disabled="#{not device.editMode}" />

				<h:outputLabel value="WeiBox Token:" />
				<h:inputText value="#{device.content.weibo_token}" id="weibo_token"
					disabled="#{not device.editMode}" />

				<h:outputLabel value="Type:" />
				<h:selectOneMenu value="#{device.content.type}" id="type"
					disabled="#{not device.editMode}" style="width:240px">
					<f:selectItems value="#{device.types}" />
				</h:selectOneMenu>


				<h:outputLabel value="Parent Id:" />
				<h:inputText value="#{device.content.parentId}" id="parentId"
					disabled="true" />


			</h:panelGrid>
		</h:form>
	</f:view>
</body>
</html>
